<?php
class Artifact {
	var $artifact_id;
	var $artifact_type;
	var $title;
	var $description;
	var $url;
	var $last_update_time;
	var $visitor_count;
	var $title_img_url;
	
	public static function getArtifactList($result) {
		$artifacts = array();
		while ($row = mysql_fetch_array($result)) {
			$artifact = new Artifact();
			$artifact->artifact_id = $row["artifact_id"];
			$artifact->artifact_type = $row["artifact_type"];
			$artifact->last_update_time = $row["dt"];
			$artifact->url = $row["url"];
			$artifact->title = $row["title"];
			$artifact->description = $row["description"];
			$artifact->visitor_count = $row["visitor_count"];
			$artifact->title_img_url = $row["title_img_url"];
			
			$artifacts[] = $artifact;
		}
		return $artifacts;
	}
}
?>
